Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Add 2 new Pay functions: convertFiatToCrypto and convertCryptoToFiat #5457

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Nov 19, 2024

CNCT-2369

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR introduces two new functions for converting between fiat and crypto values, specifically convertFiatToCrypto and convertCryptoToFiat. It also adds corresponding endpoints and tests for these functions.

Detailed summary

  • Added convertFiatToCrypto and convertCryptoToFiat functions.
  • Created endpoints for fiat-to-crypto and crypto-to-fiat conversions.
  • Implemented tests for both conversion functions covering various scenarios.
  • Updated documentation with usage examples for the new functions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Nov 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 10:31am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 10:31am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 10:31am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 10:31am

Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: 57fa96b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

graphite-app bot commented Nov 19, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Nov 19, 2024
Copy link
Contributor Author

kien-ngo commented Nov 19, 2024

@kien-ngo kien-ngo changed the title update [SDK] Add 2 new Pay functions: convertFiatToCrypto and convertCryptoToFiat Nov 19, 2024
@kien-ngo kien-ngo marked this pull request as ready for review November 19, 2024 07:53
Copy link
Contributor

github-actions bot commented Nov 19, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.92 KB (0%) 959 ms (0%) 4 s (+9.14% 🔺) 4.9 s
thirdweb (cjs) 107.33 KB (-0.08% 🔽) 2.2 s (-0.08% 🔽) 7.1 s (+5.85% 🔺) 9.2 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 282 ms (+10.62% 🔺) 394 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 44 ms (-0.94% 🔽) 54 ms
thirdweb/react (minimal + tree-shaking) 18.28 KB (0%) 366 ms (0%) 585 ms (+60.6% 🔺) 950 ms

@kien-ngo kien-ngo force-pushed the kien/pay-convert-endpoints branch from a613e2e to 980e2d3 Compare November 19, 2024 07:56
@kien-ngo kien-ngo force-pushed the kien/pay-convert-endpoints branch from 980e2d3 to d99b778 Compare November 19, 2024 16:09
@kien-ngo kien-ngo changed the title [SDK] Add 2 new Pay functions: convertFiatToCrypto and convertCryptoToFiat [SDK] WIP: Add 2 new Pay functions: convertFiatToCrypto and convertCryptoToFiat Nov 19, 2024
"thirdweb": minor
---

Add 2 new Pay functions: convertFiatToCrypto and convertCryptoToFiat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a quick example in the changeset?

Copy link

graphite-app bot commented Dec 2, 2024

Merge activity

…oFiat (#5457)

CNCT-2369
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces two new functions for converting between fiat and crypto currencies in the `thirdweb` package, along with corresponding tests and endpoints.

### Detailed summary
- Added `convertFiatToCrypto` and `convertCryptoToFiat` functions.
- Created endpoints for fiat to crypto and crypto to fiat conversions.
- Implemented tests for both conversion functions, covering various scenarios and error handling.
- Updated documentation with examples for the new functions.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants